home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
pdoxwin
/
pi0495.zip
/
LW9504.EXE
/
easter.sc
next >
Wrap
Text File
|
1995-01-20
|
1KB
|
52 lines
CREATE "easter1"
"Year" : "S*",
"Month" : "A5",
"Day" : "S"
ARRAY newdate[4]
newdate[1] = "easter1"
PROC FLOOR(n)
RETURN INT(n)
ENDPROC
COEDIT "easter1"
FOR easter_year FROM 1950 TO 2000
golden_number = MOD(easter_year, 19)
+ 1
century = FLOOR(easter_year/100) + 1
leap_year_correction
= FLOOR(3*century/4) - 12
lunar_correction
= FLOOR((8*century+5)/25) - 5
sunday = FLOOR(5*easter_year/4)
- leap_year_correction
- 10
epact = MOD(11*golden_number + 20
+ lunar_correction
- leap_year_correction,
30)
IF (epact = 25 AND golden_number > 11)
OR (epact = 24)
THEN
epact = epact + 1
ENDIF
full_moon = 44 - epact
IF full_moon < 21
THEN
full_moon = full_moon + 30
ENDIF
easter_sunday = full_moon + 7
- MOD(sunday + full_moon, 7)
IF easter_sunday > 31
THEN
easter_sunday
= easter_sunday - 31
easter_month = "April"
ELSE
easter_month = "March"
ENDIF
newdate[2] = easter_year
newdate[3] = easter_month
newdate[4] = easter_sunday
APPENDARRAY newdate
ENDFOR
RESET